using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter10
{
	/// <summary>
	/// Example09: The Net Torque on a Cylinder
	/// A one piece cylinder is shaped as shown in Figure 10.15, 
	/// with a core section protruding from the large drum. 
	/// The cylinder is free to rotate about the central axis 
	/// shown in the drawing. A rope wrapped around the drum, 
	/// which has radius R_1, exerts a force T_1 to the right on the 
	/// cylinder. A rope wrapped around the core, which has 
	/// radius R_2, exerts a force T_2 downward on the cylinder.
	/// (A) What is the net torque acting on the cylinder about 
	/// the rotation axis (which is the z axis in Figure 10.15)?
	/// (B) Suppose  T_1 = 5.0 N, R_1 = 1.0 m, T_2 = 15.0 N 
	/// and R_2 = 0.50 m. What is the net torque about the 
	/// rotation axis, and which way does cylinder rotate 
	/// starting from rest?
	/// </summary>
	public class Example09
	{
		public Example09()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Position r1 = new L.Position();
			r1.Y = 1.0;
			L.Position r2 = new L.Position();
			r2.X = -0.5;
			L.Force f1 = new L.Force();
			f1.X = 5.0;
			L.Force f2 = new L.Force();
			f2.Y = -15.0;
			L.Torque tau1 = new L.Torque(r1,f1);
			L.Torque tau2 = new L.Torque(r2,f2);
			L.Vector totaltau = tau1 + tau2;
			result+=Convert.ToString(totaltau.Z);
		}
	}
}
